all: dbtester

syncup_db.o: syncup_db.c
	gcc -Wall -g -I/usr/include/mysql -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -c syncup_db.c

dbtester: dbtester.o syncup_db.o
	gcc -o dbtester -rdynamic dbtester.o syncup_db.o -L. -L/usr/lib/mysql -lmysqld -ldl -lz -lpthread -lcrypt -lnsl -lm -lpthread -lstdc++ -lglib-2.0
	
dbtester.o: dbtester.c
	gcc -Wall -g -I/usr/include/mysql -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -c dbtester.c

clean:
	rm -rf *.o syncup_db dbtester data/syncupremotedb
